Skip to content

feat(slider): new TEDI-Ready component #13#607

Merged
airikej merged 11 commits into
rcfrom
feat/13-slider-new-tedi-ready-component
May 7, 2026
Merged

feat(slider): new TEDI-Ready component #13#607
airikej merged 11 commits into
rcfrom
feat/13-slider-new-tedi-ready-component

Conversation

@airikej
Copy link
Copy Markdown
Contributor

@airikej airikej commented Apr 22, 2026

Summary by CodeRabbit

  • New Features

    • Added a TEDI-Ready Slider form component: controlled/uncontrolled modes, min/max labels, optional tooltip, helper/feedback, disabled/invalid states, value formatting, addon slot, and accessibility support.
    • Exposed the Slider from the public API.
  • Documentation

    • Added component reference with full props and usage examples.
  • Styles

    • Added slider styles including track, thumb, hover/drag/disabled/invalid states.
  • Storybook

    • Added interactive stories demonstrating slider states and integrations.
  • Tests

    • Added comprehensive unit and accessibility tests for behaviors and edge cases.
  • Chores

    • Added optional overlay prop to enable high-frequency positioning updates.

@airikej airikej linked an issue Apr 22, 2026 that may be closed by this pull request
21 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@airikej has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 44 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0c6f76f7-607f-4357-a0f5-d26cf268a62c

📥 Commits

Reviewing files that changed from the base of the PR and between 5e72428 and 109397a.

📒 Files selected for processing (3)
  • src/tedi/components/form/slider/slider.module.scss
  • src/tedi/components/form/slider/slider.stories.tsx
  • src/tedi/index.ts
📝 Walkthrough

Walkthrough

Adds a new TEDI Slider form component with implementation, styles, tests, Storybook stories, documentation, and a public export; also adds an optional overlay prop to track reference position.

Changes

Cohort / File(s) Summary
Component & Styles
src/tedi/components/form/slider/slider.tsx, src/tedi/components/form/slider/slider.module.scss
New Slider component (controlled/uncontrolled, clamping, tooltip, valueFormatter, pointer-drag handling, accessibility attributes, ref forwarding) and corresponding SCSS module with track/thumb styling and state modifiers (disabled, invalid, dragging, hover).
Tests & Stories
src/tedi/components/form/slider/slider.spec.tsx, src/tedi/components/form/slider/slider.stories.tsx
Comprehensive test suite covering rendering, controlled/uncontrolled flows, clamping, accessibility, tooltip behavior, dragging, and ref forwarding. Storybook stories demonstrating multiple slider states and interaction templates.
Docs & Exports
skills/tedi-react/references/components.md, src/tedi/index.ts
Documentation added for SliderProps and usage example. Barrel export updated to re-export the new slider component.
Overlay behavior
src/tedi/components/overlays/overlay/overlay.tsx
Added optional trackReferencePosition?: boolean to OverlayProps; enables per-frame autoUpdate when true (autoUpdate(..., { animationFrame: true })) otherwise keeps default autoUpdate.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • mart-sessman
  • ly-tempel-bitweb
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: introduction of a new Slider component to the TEDI-Ready component library.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/13-slider-new-tedi-ready-component

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/tedi/components/form/slider/slider.module.scss`:
- Around line 49-54: The thumb-anchor left calc is invalid because
--tedi-slider-progress is set as a percent string (e.g., "40%") but CSS
multiplication requires the progress operand be unitless; change the code that
sets --tedi-slider-progress (in the slider component) to a unitless decimal
ratio (e.g., 0.4) instead of a percent string, and update the
.tedi-slider__thumb-anchor calc to multiply that unitless var by the percentage
dimension (use var(--tedi-slider-progress) * (100% -
var(--form-slider-thumb-size)) and keep the thumb offset addition), ensuring the
CSS uses the new unitless progress value throughout.

In `@src/tedi/components/form/slider/slider.stories.tsx`:
- Around line 60-82: The two Story exports MinAndMaxValues and CurrentValue
render the slider without an accessible name; update each story's args to
provide either a visible label prop or an aria-label/aria-labelledby prop (e.g.,
add label: 'Volume' or aria-label: 'Volume slider') so the underlying Slider
component receives an accessible name; ensure you apply the same change for
other stories in this file (lines ~191-240) that instantiate sliders without
labels.

In `@src/tedi/components/form/slider/slider.tsx`:
- Line 156: The helper id and className are being overwritten: instead of always
setting helperId to `${id}-helper`, use the existing helper.id when present
(e.g., const helperId = helper?.id ?? `${id}-helper`) and when rendering
FeedbackTextProps merge class names so `tedi-slider__feedback` is preserved
(build a combined class string like `tedi-slider__feedback ${helper?.className
?? ''}` and pass that as className, ensuring the spread of ...helper does not
overwrite it). Apply the same pattern in the other feedback rendering block
(around the 253-288 area) so helper.id is preserved and helper.className is
merged rather than replacing the default class.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cc313bdd-34a9-465a-a8fa-eab4dd8ae7a1

📥 Commits

Reviewing files that changed from the base of the PR and between b0af3cc and a9f5727.

📒 Files selected for processing (6)
  • skills/tedi-react/references/components.md
  • src/tedi/components/form/slider/slider.module.scss
  • src/tedi/components/form/slider/slider.spec.tsx
  • src/tedi/components/form/slider/slider.stories.tsx
  • src/tedi/components/form/slider/slider.tsx
  • src/tedi/index.ts

Comment thread src/tedi/components/form/slider/slider.module.scss
Comment thread src/tedi/components/form/slider/slider.stories.tsx
Comment thread src/tedi/components/form/slider/slider.tsx Outdated
@airikej
Copy link
Copy Markdown
Contributor Author

airikej commented Apr 22, 2026

@coderabbitai resolve

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

✅ Actions performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

Comment thread src/tedi/components/form/slider/slider.stories.tsx Outdated
Comment thread src/tedi/components/form/slider/slider.module.scss
Comment thread src/tedi/components/form/slider/slider.tsx
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/tedi/components/overlays/overlay/overlay.tsx (1)

163-309: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Set Overlay.displayName before exporting.

This exported component currently has no displayName, which makes React DevTools output less useful and violates the component guidelines.

As per coding guidelines, all exported components must have a displayName property set.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/tedi/components/overlays/overlay/overlay.tsx` around lines 163 - 309, The
exported Overlay component lacks a displayName which harms DevTools and violates
guidelines; set Overlay.displayName = 'Overlay' (and optionally set
Overlay.Trigger.displayName = 'Overlay.Trigger' and Overlay.Content.displayName
= 'Overlay.Content') immediately before the existing exports so the named
components appear correctly in React DevTools and follow the component
displayName convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/tedi/components/form/slider/slider.tsx`:
- Line 298: The JSX currently uses a truthy guard "{addonRight && <div
className={styles['tedi-slider__addon']}>{addonRight}</div>}" which will omit
legitimate ReactNode values like 0 or ''. Change the condition to an explicit
null/undefined check (e.g., "addonRight != null") so the element renders when
addonRight is a valid ReactNode even if falsy; update the expression that
references addonRight and styles['tedi-slider__addon'] accordingly.

---

Outside diff comments:
In `@src/tedi/components/overlays/overlay/overlay.tsx`:
- Around line 163-309: The exported Overlay component lacks a displayName which
harms DevTools and violates guidelines; set Overlay.displayName = 'Overlay' (and
optionally set Overlay.Trigger.displayName = 'Overlay.Trigger' and
Overlay.Content.displayName = 'Overlay.Content') immediately before the existing
exports so the named components appear correctly in React DevTools and follow
the component displayName convention.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7f7420b6-4407-4873-b3a7-ed311479f851

📥 Commits

Reviewing files that changed from the base of the PR and between a9f5727 and 5e72428.

📒 Files selected for processing (5)
  • src/tedi/components/form/slider/slider.module.scss
  • src/tedi/components/form/slider/slider.spec.tsx
  • src/tedi/components/form/slider/slider.stories.tsx
  • src/tedi/components/form/slider/slider.tsx
  • src/tedi/components/overlays/overlay/overlay.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/tedi/components/form/slider/slider.stories.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/tedi/components/form/slider/slider.module.scss

Comment thread src/tedi/components/form/slider/slider.tsx
@airikej airikej temporarily deployed to github-pages May 5, 2026 05:54 — with GitHub Actions Inactive
Comment thread src/tedi/components/form/slider/slider.stories.tsx
Comment thread src/tedi/components/form/slider/slider.stories.tsx
Comment thread src/tedi/components/form/slider/slider.module.scss
@airikej airikej temporarily deployed to github-pages May 6, 2026 06:59 — with GitHub Actions Inactive
@airikej airikej requested a review from ly-tempel-bitweb May 6, 2026 07:03
@airikej airikej temporarily deployed to github-pages May 7, 2026 07:14 — with GitHub Actions Inactive
@airikej airikej merged commit 3567038 into rc May 7, 2026
22 checks passed
@airikej airikej deleted the feat/13-slider-new-tedi-ready-component branch May 7, 2026 07:22
github-actions Bot pushed a commit that referenced this pull request May 7, 2026
# [17.1.0-rc.2](react-17.1.0-rc.1...react-17.1.0-rc.2) (2026-05-07)

### Features

* **slider:** new TEDI-Ready component [#13](#13) ([#607](#607)) ([3567038](3567038))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Slider]: New TEDI-Ready component

2 participants